/* 
 * File:   entity_html_viewer.hpp
 * Author: jolo
 *
 * Created on 12. Oktober 2011, 07:23
 */

#ifndef ENTITY_HTML_VIEWER_HPP
#define	ENTITY_HTML_VIEWER_HPP

#include <QtWebKit/QWebView>

#include <core/core.hpp>

namespace model {
    class entity;
    
    typedef shared_ptr<entity> entity_ptr;
}

namespace tools {
    class entity_formatter;
    typedef shared_ptr<entity_formatter> entity_formatter_ptr;
}

namespace widgets
{

    class entity_html_viewer : public QWebView
    {
        Q_OBJECT
    public:
        entity_html_viewer(QWidget* p);
        virtual ~entity_html_viewer();
        
    public slots:
        void on_show_request(model::entity_ptr);
        
    private:
        tools::entity_formatter_ptr f_;
    };
}

#endif	/* ENTITY_HTML_VIEWER_HPP */

